package com.bootdo.wx.service.impl;

import com.bootdo.common.utils.PageHelperUtils;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

import com.bootdo.wx.dao.CmsNoticeSysDao;
import com.bootdo.wx.domain.CmsNoticeSysDO;
import com.bootdo.wx.service.CmsNoticeSysService;



@Service
public class CmsNoticeSysServiceImpl implements CmsNoticeSysService {
	@Autowired
	private CmsNoticeSysDao cmsNoticeSysDao;
	
	@Override
	public CmsNoticeSysDO get(String id){
		return cmsNoticeSysDao.get(id);
	}
	
	@Override
	public List<CmsNoticeSysDO> list(Map<String, Object> map){
		return cmsNoticeSysDao.list(map);
	}
	
	@Override
	public int count(Map<String, Object> map){
		return cmsNoticeSysDao.count(map);
	}
	
	@Override
	public int save(CmsNoticeSysDO cmsNoticeSys){
		return cmsNoticeSysDao.save(cmsNoticeSys);
	}
	
	@Override
	public int update(CmsNoticeSysDO cmsNoticeSys){
		return cmsNoticeSysDao.update(cmsNoticeSys);
	}
	
	@Override
	public int remove(String id){
		return cmsNoticeSysDao.remove(id);
	}
	
	@Override
	public int batchRemove(String[] ids){
		return cmsNoticeSysDao.batchRemove(ids);
	}

	@Override
	public PageInfo<CmsNoticeSysDO> queryAll(Map<String, Object> paramMap) {
		PageHelperUtils.page(paramMap);
		List<CmsNoticeSysDO> list =cmsNoticeSysDao.queryByPage(paramMap);
		PageInfo<CmsNoticeSysDO> pageInfo = new PageInfo<>(list);
		return pageInfo;
	}
}
